/**
 * Loader.java ##copyright## This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation; either version 2.1 of the License, or (at your option) any later version. This
 * library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details. You should have received a copy of the GNU Lesser
 * General Public License along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 * 
 * @author ##author##
 * @modified ##date##
 * @version ##version##
 */
package fiveagon.loader;

import java.util.List;

/**
 * Mass Loading. You can rest easy, and care a <em>lot</em> less how your filenames in your data
 * folder are formatted.
 * 
 * @param <E> the Generic class that this object will load.
 * @example BasicLoader
 */
public interface Loader<E> {
  /**
   * Gets a <code>List</code> of all Elements that can possibly be loaded by this
   * <code>Loader</code>.
   * 
   * @return a List of all loaded Elements
   */
  List<E> load();

  /**
   * Gets a <code>List</code> of all Elements that match a <code>search</code> .
   * 
   * @param search the string to match against files
   * @return a List of loaded Elements that match the search
   */
  List<E> load(String search);

  /**
   * Gets a single Element that matches a <code>search</code>.
   * 
   * @param search the string to match against files
   * @return the first file loaded into an <code>Element</code> that matches the <code>search</code>
   *         , else <code>null</code>
   */
  E loadSingle(String search);
}
